<?php

	global $prefix, $db, $uniquecode;
	echo $uniquecode;
	$config = $db->sql_fetchrow($db->sql_query("SELECT * FROM ".$prefix."_upload_config"));
	$sql = $db->sql_fetchrow($db->sql_query("SELECT * FROM ".$prefix."_upload WHERE uniquecode='".$uniquecode."'"));
	$image = $config['path'].$sql['img'];
	unlink($image);
	$db->sql_query("DELETE FROM ".$prefix."_upload WHERE uniquecode='".$uniquecode."'") or die(mysql_error());
	redirect("modules.php?name=Upload&op=yourimages");
?>